package com.jacobson.huobi.mvp.contract

import com.alibaba.fastjson.JSONObject
import com.jacobson.core.mvp.IModel
import com.jacobson.core.mvp.IPresenter
import com.jacobson.core.mvp.IView
import com.jacobson.huobi.entities.evt.UpdPwdEvt
import com.jacobson.huobi.entities.response.CommonResponse
import com.jacobson.huobi.entities.response.LoginPageResponse
import io.reactivex.Observable

interface EditPasswordContract {
    interface Model : IModel {
        fun updatePwd(pwdEvt: UpdPwdEvt): Observable<CommonResponse<JSONObject>>

        fun logout(
        ): Observable<CommonResponse<JSONObject>>

        fun getVertiCode(
            phone: String
        ): Observable<LoginPageResponse>
    }

    interface View : IView {

        fun onUpdatePwdResultResp(response: CommonResponse<JSONObject>)

        fun onLogoutResultResp(response: CommonResponse<JSONObject>)

        fun onVertiCodeResultResp(response: LoginPageResponse)
    }

    interface Presenter : IPresenter {
        fun updatePwd(pwdEvt: UpdPwdEvt)

        fun logout()

        fun getVertiCode(
            phone: String
        )
    }
}